/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Andres
 */
@Embeddable
public class ReservatransportePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "RESERVA_CODIGORESERVA", nullable = false)
    private int reservaCodigoreserva;
    @Basic(optional = false)
    @Column(name = "CONF_PERSONA_CODPE", nullable = false)
    private int confPersonaCodpe;

    public ReservatransportePK() {
    }

    public ReservatransportePK(int reservaCodigoreserva, int confPersonaCodpe) {
        this.reservaCodigoreserva = reservaCodigoreserva;
        this.confPersonaCodpe = confPersonaCodpe;
    }

    public int getReservaCodigoreserva() {
        return reservaCodigoreserva;
    }

    public void setReservaCodigoreserva(int reservaCodigoreserva) {
        this.reservaCodigoreserva = reservaCodigoreserva;
    }

    public int getConfPersonaCodpe() {
        return confPersonaCodpe;
    }

    public void setConfPersonaCodpe(int confPersonaCodpe) {
        this.confPersonaCodpe = confPersonaCodpe;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) reservaCodigoreserva;
        hash += (int) confPersonaCodpe;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ReservatransportePK)) {
            return false;
        }
        ReservatransportePK other = (ReservatransportePK) object;
        if (this.reservaCodigoreserva != other.reservaCodigoreserva) {
            return false;
        }
        if (this.confPersonaCodpe != other.confPersonaCodpe) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.ReservatransportePK[reservaCodigoreserva=" + reservaCodigoreserva + ", confPersonaCodpe=" + confPersonaCodpe + "]";
    }

}
